import { MusicDao} from './../dao/music'
import { MovieDao } from './../dao/movie'
import { SentenceDao } from './../dao/sentence'
import { NotFound} from "lin-mizar";

class Content {
	static addContent(v) {
		switch (v['type']) {
			case 100:
				// 电影
				MovieDao.addMovie(v)
				break
			case 200:
				// 音乐
				MusicDao.addMusic(v)
				break
			case 300:
				// 句子
				SentenceDao.addSentence(v)
				break
			default:
				throw new NotFound({msg: '没有对应的类型'})
		}
	}
}

export {Content as ContentService}
